package com.traveldream.entity_managers;

import java.util.Date;
import java.util.List;

import javax.ejb.Local;

import com.traveldream.entities.CustomPacket;
import com.traveldream.entities.DefaultPacket;
import com.traveldream.entities.Packet;
import com.traveldream.entities.Place;
import com.traveldream.entities.User;

@Local
public interface PacketManager {

	public List<DefaultPacket> findAllDefaultPackets();
	
	public DefaultPacket findDefaultPacket(int id);
	public CustomPacket  findCustomPacket(int id);

	public List<CustomPacket>  findByCustomer(User c);
	// se end(start)=null si cerca solo per data di inizio(fine)
	// cerca packet con p.start >= di start e p.end <= end
	public List<DefaultPacket> findByDates(Date start,Date end);
	public List<DefaultPacket> findByPlace(Place p);
	public List<DefaultPacket> findByDatesAndPlace(Date start, Date end,Place place) ;
	
	public DefaultPacket create(DefaultPacket dp);
	public CustomPacket create(CustomPacket cp);
	public Packet create(Packet p);
	
	public DefaultPacket update(DefaultPacket dp);
	public CustomPacket  update(CustomPacket cp);
	public Packet update(Packet p);
		
	public boolean delete(int id);
}
